package com.spbdx.system.sysdict;


import com.spbdx.system.sysdict.support.DictCategory;
import com.spbdx.system.sysdict.support.DictionaryCategory;
import com.spbdx.system.sysdict.support.DictionaryCode;

/**
 * Description 信息发布类型
 *
 * @author chenwei
 * @version 1.0
 * @date 2023/7/24 10:14
 */
@DictionaryCategory(DictCategory.INFO_TYPE)
public enum InfoTypeEnum implements DictionaryCode {
    FILE("文件发布"),
    INFO("资讯发布"),
    MEMBER_DEMEANOUR("党员风采"),
    WORK_OPEN("党务公开"),
    SUBJECT_ACTIVITY("主题活动");

    private String label;

    InfoTypeEnum(String label) {
        this.label = label;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getLabel(String code) {
        for (InfoTypeEnum statusEnum : InfoTypeEnum.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getLabel();
            }
        }
        return "";
    }

}
